//
//  UserTableViewCell.m
//  LT
//
//  Created by dllo on 16/5/19.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "UserTableViewCell.h"

@implementation UserTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return self;
}

-(void)createSubViews{
  //图片
    self.userImage = [[UIImageView alloc]init];
    //self.userImage.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.userImage];
    
    //文字Label;
    self.userLabel = [[UILabel alloc]init];
   // self.userLabel.backgroundColor = [UIColor whiteColor];
    self.userLabel.textAlignment = NSTextAlignmentLeft;
    [self.contentView addSubview:self.userLabel];
    //lineLabel
    self.lineLabel = [[UILabel alloc]init];
   // self.lineLabel.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.lineLabel];
    
    
}

-(void)layoutSubviews{
    [super layoutSubviews];
    
    self.userImage.frame = CGRectMake(20 * WIDTHCELL, 10* WIDTHCELL, 50* WIDTHCELL, 50* WIDTHCELL);
    self.userLabel.frame = CGRectMake(70* WIDTHCELL, 10* WIDTHCELL, (self.contentView.frame.size.width - 70)* WIDTHCELL, 50* WIDTHCELL);
    self.lineLabel.frame = CGRectMake(20* WIDTHCELL, 55* WIDTHCELL, (self.contentView.frame.size.width - 20)* WIDTHCELL, 1* WIDTHCELL);
    
    
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
